/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package core;

/**
 *
 * @author Peter
 */
public class Book
{
    private long id;
    private String isbn10;
    private String isbn13;
    private String title;
    private String author;
    private String description;
    private String link;
    private int price;    

    /**
     * Default constructor, all elements = null?
     */
    public Book()
    {
    }

    public Book( long id,
                 String isbn10,
                 String isbn13,
                 String title,
                 String author,
                 String description,
                 String link,
                 int price
                 )
    {
        this.id = id;
        this.isbn10 = isbn10;
        this.isbn13 = isbn13;
        this.title = title;
        this.author = author;
        this.description = description;
        this.link = link;
        this.price = price;
    }
     /**
      * 
      * @param id
      */
     public void setId(long id)
     {
         this.id = id;
     }
     /**
      * get ISBN10
      * @return
      */
     public long getId()
     {
         return id;
     }



     /**
      * sets ISBN10
      * @param ISBN
      */
     public void setIsbn10(String isbn10)
     {
         this.isbn10 = isbn10;
     }
     /**
      * get ISBN10
      * @return
      */
     public String getIsbn10()
     {
         return isbn10;
     }

          /**
      * sets ISBN13
      * @param ISBN13
      */
     public void setIsbn13(String isbn13)
     {
         this.isbn13 = isbn13;
     }
     /**
      * get ISBN10
      * @return
      */
     public String getIsbn13()
     {
         return isbn13;
     }

     /**
      * set title
      * @param title
      */
     public void setTitle(String title)
     {
         this.title = title;
     }
     /**
      * get title
      * @return
      */
     public String getTitle()
     {
         return title;
     }
     /**
      * set author
      * @param autor
      */
     public void setAuthor(String author)
     {
         this.author = author;
     }
     /**
      * get author
      * @return
      */
     public String getAuthor()
     {
         return author;
     }
     /**
      * set description
      * @param description
      */
     public void setDescription(String description)
     {
         this.description = description;
     }
     /**
      * get description
      * @return
      */
     public String getDescription()
     {
         return description;
     }
           /**
            * set link
            * @param link
            */
     public void setLink(String link)
     {
         this.link = link;
     }
     /**
      * get link
      * @return
      */
     public String getLink()
     {
         return link;
     }
     /**
      * set price
      * @param price
      */
     public void setPrice(int price)
     {
         this.price = price;
     }
     /**
      * get price
      * @return
      */
     public int getPrice()
     {
         return price;
     }
     /**
      * 
      * @param b
      * @return
      */
    public boolean equals(Book b)
    {
         if(b == null)
             return false;
         if(this == b)
             return true;
        return id == b.id;
     }
     /**
      * 
      * @return 
      */
     @Override
     public String toString()
     {
         return
                "id: " + id + "\n" +
                "isbn10: " + isbn10 + "\n" +
                "isbn13: " + isbn13 + "\n" +
                "title: " + title + "\n" +
                "author: " + author + "\n" +
                "description: " + description + "\n" +
                "link: " + link + "\n" +
                "price: " + price + "\n" ;
     }
}

